The present invention relates to a spool file modifying device which is used to modify a spool file for a print job to create a new spool file.
Conventionally, a printing system is employed in a computer system such as a personal computer (hereinafter occasionally referred to as PC). The printing system typically functions to generate a spool file for each print job in response to a printing instruction through application software. The spool file is temporarily stored in a storage device such as a hard disk drive (HDD). The printing system manages the print job such that, depending on an operational status of the printer, the spool file is transmitted to the printer. Generally, such a printing system is realized as a part of function of an OS (Operation System) of the computer.
FIG. 7 shows an exemplary data flow of a conventional printing system. In FIG. 7, an application program 41 is executed on the OS, for example, “Windows XP” (trademark) provided by Microsoft Corporation, and printing data (e.g., document data) created by a user using the application program 41 is output as indicated in FIG. 7.
That is, when the user operates the application program 41 to print, a print instruction is transmitted to a GDI (Graphics Device Interface) 42, which is a program module provided by the “Widows XP”.
The GDI 42 generates a DC (Device Context) which is a virtual display area or a virtual device. The DC is provided for the use of the application program 41. When the DC is provided, the application program 41 performs an imaging procedure to write an image in the DC with reference to coordinates thereof, thereby an EMF (Enhanced Meta File), which is an intermediate file independent of a kind of a printer, is created for each printing page.
A plurality of intermediate files for respective pages are combined into a spool file which corresponds to one print job by a spooler system 43. Then a print processor 44 transmits the thus created spool file to another GDI (i.e., the printer driver) 45. The GDI 45 converts the received spool file into data having printer control codes suitable to a target printer.
The conversion described above by the GDI 45 is executed as a printer driver provided by a manufacturer of the printer and the OS interact. Specifically, the printer driver receives the spool file from the print processor 44, and then the printer driver calls the OS. The OS executes rasterizing of the spool file (i.e., developing of the spool file into a bitmap). The raster image (i.e., the bitmap image) is then converted by the printer driver into printer control codes.
In the meantime, recently, there is a need for performing modified print jobs. The modified print jobs include, for example, a so-called N-in-1 (e.g., 4-in-1, 2-in-1, etc.) which is a printing in a multi-page format, with which a document is printed such that a plurality of pages are reduced and incorporated within one page of printed document. Another requirement is that two different images are printed overlaid (e.g., printing of watermark). The present applicant has suggested, in Japanese Patent Provisional Publication No. HEI 11-219265, a technique for realizing such a modified printing by modifying the spool file.
According to the technique disclosed in the publication, a spool file stored by the spooler system 43 is retrieved using the print processor 44. Next, the retrieved spool file is divided into intermediate files for respective printing pages. Then, the page-divided intermediate files are processed (modified) to create a new spool file, or a modified spool file, which is returned to the spooler system 43. Then, the GDI 45 converts the modified spool file into print control codes suitable to the printer to be used for printing. Thereby, the above modified print jobs are executed.
In the conventional printing system described above, when a bitmap is included in a print job created by the application 41, a problem as follows arises. That is, if the above-described technique of modifying the spool file is applied to the spool file for the print job including the bitmap to perform the modified printing including reduction of a page, such as a multi-page format printing, depending on the application program 41 used, the gradation of the original bitmap (i.e., the bitmap before reduced) is not maintained in the reduced bitmap, and a desired printing result is not obtained.
Hereinafter, this problem will be described in detail with reference to FIGS. 8A and 8B.
In the “Windows” (trademark) system, the process of gradation upon reduction of the bitmap included in the intermediate files (i.e., EMFs) of a print job created by an application program can be previously specified in the application program.
That is, when the intermediate file for a print job including the bitmap is generated by the application program, the intermediate file (which consists of a plurality of records: see FIG. 2) includes a record indicative of a gradation processing mode when the reduction of the bitmap is executed by a program such as the printer driver other than the application program is included in
In the case of “Windows”, as the gradation processing mode (in “Windows”, it is called as a bitmap extension/reduction mode), various modes such as black priority binarization mode (in “Windows”, referred as “BLACKONWHITE” mode), white priority binarization mode (in “Windows”, referred to as “WHITEONBLACK” mode), halftone mode are previously prepared. When a record indicating one of such prepared modes is added in the intermediate file, the gradation mode to be used is designated.
Specifically, when the application program designates a black priority binarizing mode for a certain bitmap, and if the spool file including the bitmap is to be reduced in accordance with the above-described spool file modifying method and then the modified spool file is to be rasterized by the OS, then the OS rasterizes the spool file in accordance with the record indicating the black priority binarizing mode.
The black priority binarizing is a method, as indicated in FIG. 8A, to combine two adjoining dots into one black dot for reduction, if at least one of the two dots is black.
Similarly, the white priority binarizing is a method to combine two adjoining dots, if at least one of which is white, into one white dot. These binarizing methods can be used, for example, in the 4-in-1 modification (i.e., modification to incorporate four pages in one page by reduction). FIG. 8B shows an example of the 4-in-1 modification employing the black priority binarizing method.
The halftone mode is a mode where the gradation of the original image is retained after the image is reduced. Various method to produce a reduced image retaining the gradation of the original image have been conventionally suggested. For example, the arrangement and the color of each dot are determined based on the arrangement and colors of the dots in the vicinity of each dot. Due to a relatively complicated computation, a processing speed of the halftone mode is generally slower than the black or white priority binarizing mode.
In the most applications, the halftone mode is selected as the gradation processing mode. Therefore, when the spool file (including a bitmap) created by such applications is to be modified to reduce an image, the OS rasterizes the spool file with retaining the gradation of the original bitmap in accordance with a halftone mode designating record included in the intermediate file. Thus, the reduced image retaining the gradation of the original bitmap can be output.
There are applications which designate the black/white priority mode as the gradation processing mode, or which does not designate any mode for processing the gradation.
In the former case, when the OS rasterized a spool file, the designated gradation processing mode is used. If, for example, the black priority mode is designated, then the processing as exemplified in FIG. 8A is performed. Therefore, as shown in the example of 4-in-1 modification shown in FIG. 8B, the reduced image does not reflect the gradation of the bitmap (i.e., the gradation of the bitmap is collapsed). It should be noted that if the halftone mode was selected, the gradation of the original image would have been retained.
In the latter case (i.e., if the processing mode is not designated), typically the Windows OS uses the black priority mode as a default mode. Therefore, when the image is processed in the latter case, the resultant image is as shown in FIG. 8B, in which the gradation of the original image is not reflected (i.e., the gradation of the bitmap is collapsed).
There are applications having a page layout function, in which the reduced image (e.g., 4-in-1 image) can be designated. In such a case, an intermediate file according to the designated page layout is created by such applications. Therefore, in such a case, the printer driver does not reduce the image created by the application and the above-described problem would not occur.
It should be stressed that the problem to be dealt with occurs when the printer driver modifies the spool file created by the applications.